<?php
/**
 * Create By: PhpStorm
 * User: yihua
 * File: UserFavorite.php
 * Date: 2016/12/14
 * Time: 0:13
 */

namespace app\api\controller;

use app\api\model\page\user\RemoveUserFavorite;
use think\Controller;
use think\Request;
use app\api\model\page\user\AddUserFavorite;
use app\api\model\page\user\GetUserFavorite;

class UserFavorite extends Controller
{
    private $param;

    public function __construct()
    {
        $this->param = Request::instance()->param();
    }

    public function addFavorite()
    {
        $objfavorige = new AddUserFavorite();
        return $objfavorige->excute($this->param);
    }

    /**
     * @return array
     */
    public function removeFavorite()
    {
        $objfavorige = new RemoveUserFavorite();
        return $objfavorige->excute($this->param);
    }

    /**
     * @return array
     */
    public function getFavorite()
    {
        $objfavorige = new GetUserFavorite();
        return $objfavorige->excute($this->param);
    }

}